package scalab.utils

object Timestamp{

	import java.io.File

	def apply(file: File): long = try{
		file.lastModified
	}
	catch{
		case _ => 0L
	}

	def apply(path: String): long = apply(new File(path))

	def apply(files: Iterable[File]): Iterable[long] = files map {f => apply(f)}
	//def apply(paths: Iterable[String]): Iterable[long] = paths map {p => apply(p)}
	def apply(file1: File, files: File*): Iterable[long] = apply(file1) :: apply(files).toList
	def apply(path1: String, paths: String*): Iterable[long] = apply(path1) :: (paths map {p => apply(p)}).toList
}
